InStrRev

Basic and Crystal syntax.

Overloads
Arguments
Returns

Number value that indicates the position of the matching string in the string to be matched. The first character of the inputString (from the beginning) is 1.

Action

InStrRev returns the position of the first occurrence of one string within another. The matching proceeds in the reverse direction from the specified start position.

Examples

The following examples are applicable to Basic and Crystal syntax:

InStrRev ("abcdefgbchijk", "bc")

Returns 8, where matching starts from the very end of the string in the reverse direction.

InStrRev ("abcdefgbchijk", "bc", -1)

Returns 8, where matching starts from the very end of the string in the reverse direction.

InStrRev ("abcdefgbchijk", "bc", 2)

Returns 0, i.e., no match is found. Matching starts from the "b" in "ab" in the reverse direction.

InStrRev ("abcdefgbchijk", "bc", 3)

Returns 2. Matching starts from the "c" in "abc" in the reverse direction.

InStrRev ("abcdefgbchijk", "bc", 10)

Returns 8. Matching starts from the 'h' in "abcdefgbch" in the reverse direction, and the first occurrence of "bc" is found at position 8 from the beginning of the input string.

InStrRev ("abcdefgbchijk", "BC", -1, 1)

Returns 8. Matching starts from the very end of the string in the reverse direction, and the first occurrence of "BC", independent of case since case-insensitive comparison is specified, is found at position 8 from the beginning of the input string.

InStrRev ("aBCdefgbchijk", "BC", -1, 0)

Returns 2. Matching starts from the very end of the string in the reverse direction, and the first occurrence of "BC" is found at position 2 from the beginning of the input string.

Comment

This function is designed to work like the Visual Basic function of the same name.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com